<template>
  <div>
    123
  </div>
</template>

<script>
export default {

  components: {},
  data: vm => ({

  }),

  created () {
    // 1.题

    // 2.题
    // const arr1 = [{ title: 'a', id: '1' }, { title: 'b', id: '2' }, { title: 'c', id: '3' }]
    // const obj = {}
    // arr1.forEach((item, index) => {
    //   Object.keys(item).forEach(key => {
    //     obj[`arr1[${index}]_${key}`] = arr1[index][key]
    //   })
    // })
    // Object.keys(obj).forEach(key => {
    //   console.log(key, obj[key])
    // })
    // 3.题
    const arr1 = [1, 2, 3, 4, 5, 6, 7, 8]
    // const arr2 = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
    // const arr3 = [...arr1, ...arr2]
    // console.log('arr3', arr3)
    // arr2.forEach(item => {
    //   item = '123' + item
    // })
    arr1.forEach(item => {
      item = item + 10
    })
    console.log('arr2', arr1)
  },

  methods: {
  }
}
</script>
<style scoped>

</style>
